<?php

require_once 'mp3\Smarty.php';
require_once 'mp3\Constants.php';

$smarty = new mp3_Smarty();

require_once 'mp3\GestionarUsuari.php';

if (array_key_exists('userId', $_COOKIE)){
	setcookie('userId', '', time()-1);
}
if (array_key_exists('userIdCrypt', $_COOKIE)){
	setcookie('userIdCrypt', '', time()-1);
}
if (array_key_exists('userName', $_COOKIE)){
	setcookie('userName', '', time()-1);
}
session_start();

session_unset();

$smarty->assign('sortir', 'ok');
echo $smarty->fetch('mp3\header.tpl');
echo $smarty->fetch('mp3\index.tpl');
echo $smarty->fetch('mp3\footer.tpl');


?>